<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="resource/css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="./resource/fonts/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="resource/css/jedate.css"/>
		<link rel="stylesheet" type="text/css" href="resource/css/common.css"/>
	</head>
	<body>
		<div class="container-fluid">
			<div class="row mheader">
				<div class="col-xs-2 text-left"><!--<a href="javascript:;" onclick="javascript:history.back(-1);"><span class="iconfont icon-fanhui"></span></a>--></div>
				<div class="col-xs-8"><h2>我的</h2></div>
				<div class="col-xs-2"></div>
			</div>
			<div class="row">
				<ul class="list-group">
				  <li class="list-group-item">
				  	<img class="u-pic"  src="resource/img/logos_pic.png"/>
				  	<span class="u-name">用户名</span>
				  </li>
				</ul>
			</div>
			<div class="row">
				<ul class="list-group">
					
					<li class="list-group-item" id="a">
						<a href="basic.html">
							<span class="glyphicon glyphicon-user"></span>
							<span>个人资料</span>
							<span class="glyphicon glyphicon-chevron-right fr"></span>
						</a>
					</li>
					<li class="list-group-item" id="b">
						<a href="password.html">
							<span class="glyphicon glyphicon-lock"></span>
							<span>修改密码</span>
							<span class="glyphicon glyphicon-chevron-right fr"></span>
						</a>
					</li>
				  
				</ul>
				<ul class="list-group">
				 
					<li class="list-group-item">
							<a href="./guanyu.html">
							  	<span class="glyphicon glyphicon-book"></span>
							  	<span>关于公司</span>
							    <span class="glyphicon glyphicon-chevron-right fr"></span>
						    </a>
						</li>
						<li class="list-group-item">
							<a href="./guanyuERP.html">
							  	<span class="glyphicon glyphicon-wrench"></span>
							  	<span>技术支持</span>
							    <span class="glyphicon glyphicon-chevron-right fr"></span>
						    </a>
						</li>
				</ul>
				
				<div class="btn-box">
					<button class="btn btn-default" type="button" id="eBtn" onclick="exitlogin()"><i class="glyphicon glyphicon-off"></i>&nbsp;退出登录</button>&nbsp;&nbsp;
					<button class="btn btn-default" type="button" id="" onclick="clearCache()"><i class="glyphicon glyphicon-refresh"></i >&nbsp;清除缓存</button>
				</div>
			</div>
		</div>
	</body>
</html>
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="resource/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="./resource/js/style.js"></script>
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script>

	$(function(){
	    var name = $(".u-name");
	    if ( getP() ){
			var arr = getP().split("|");
	        $(name).text(arr[0]);
		} else {
			$(name).html('<a href="login.html" >立即登录</a>');
			$("#a").remove();
			$("#b").remove();
			$("#eBtn").remove();
		}
	});

    /**
	 * 	退出
     */
	function exitlogin() {
	    var ids=getCookie('yanzheng');
	    var id=ids.split('|');
		var can=id[4];

        ajaxs("api/app/logout.do",
            'post',
            {'token':can },
            function (data) {
				console.log(data)
            }
        );

        delCookie("yanzheng");
        $("#a").remove();
        $("#b").remove();
        $("#eBtn").remove();
        //退出处理缓存
//		window.tool.exit();
//      	window.tool.clearCache();
        location.reload();
    }

    /**
	 * 	清缓存
     */
    function clearCache() {
        //app端生效
        window.tool.clearCache();
    }

    $(function () {
        var arrs=getCookie('yanzheng');
        arrs=arrs.split('|');
        console.log(arrs)
        ajaxs('api/user/loadUserDetail.do','post',{'opid':arrs[2]},function (data) {
            console.log(data);
            var datas=data.data;
            ImgUrl=datas.idphoto?urls+datas.idphoto:'resource/img/logos_pic.png';
			$('.u-pic').attr('src',ImgUrl)


        })

    })

</script>







